# -*- coding: utf-8 -*-
# @Time: 2021/8/13 14:36
# @File: list_node_common.py
# @DESC:
class ListNode:
    def __init__(self, x):
        self.val = x
        self.next = None


def listToNode(data):
    head = ListNode(0)
    p = head
    for i in data:
        p.next = ListNode(i)
        p = p.next
    return head.next
